import {request} from '@/utils/hsj/service/index'

// 查询邮件导入历史记录列表
export function listMailImportHistory(query) {
    return request({
        url: "/email/import/history/list",
        method: "get",
        query,
    });
}

// 新增邮件导入历史记录
export function addMailImportHistory(data) {
    return request({
        url: "/email/import/history",
        method: "post",
        data,
    });
}

// 修改邮件导入历史记录
export function updateMailImportHistory(data) {
    return request({
        url: "/email/import/history",
        method: "put",
        data,
    });
}

// 删除邮件导入历史记录
export function delMailImportHistory(mailImportHistoryId) {
    return request({
        url: `/email/import/history/${mailImportHistoryId}`,
        method: "delete",
    });
}

// 查询邮件导入历史记录详细
export function getMailImportHistory(mailImportHistoryId) {
    return request({
        url: `/email/import/history/${mailImportHistoryId}`,
        method: "get",
    });
}

// 根据邮件导入记录ID发送邮件
export function sendEmailByImportHistoryIds(mailImportHistoryId) {
    return request({
        url: `/email/import/history/sendEmail/${mailImportHistoryId}`,
        method: "post",
    });
}
